
export class Images {

    static toBase64(file) {

        let fileSystemManager = wx.getFileSystemManager()

        return new Promise(resolve => {

            fileSystemManager.readFile({
                filePath: file,
                encoding: 'base64',
                success: res => resolve(res.data)
            })
        })
    }
}